package com.coderedma.beans.factory;

import com.coderedma.beans.BeansException;

import java.util.Map;

/**
 * @Author coderedma
 * @Desc
 * @createTime 2024/7/29 14:20
 * @since 1.0.0
 */
public interface ListableBeanFactory extends BeanFactory {

    /**
     * 返回指定类型的bean
     * @param type
     * @return
     * @param <T>
     * @throws BeansException
     */
    <T> Map<String, T> getBeansOfType(Class<T> type) throws BeansException;

    /**
     * 返回注册表中所有的bean名称
     * @return
     */
    String[] getBeanDefinitionNames();
}
